﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Administration.aspx.cs" Inherits="SAP.Administration" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="System.Web.UI" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        Main.myUpdatePanelId = '<%= purchaseOrderUpdatePanel.ClientID %>';
       
        function ActiveTabChanged(sender, e) {

            var NewtabIndex = sender.get_activeTabIndex();
            document.cookie = "sp_CurrentTab=" + NewtabIndex.toString() + "; path=/";
            document.cookie = "CurrentTab=" + ctr._activeTabIndex + "; path=/";

        }


    </script>
    <asp:UpdatePanel ID="purchaseOrderUpdatePanel" runat="server">
   <%-- <Triggers>
   
                  <asp:PostBackTrigger ControlID="txtPassword" />
                </Triggers>--%>

        <ContentTemplate>
            <div id="contentData" style="padding-left: 15px;">
                
                <div class="clear">
                </div>
                <div id="title-form" style="border-bottom: 2px solid black;">
                    <h2>
                        SETTINGS</h2>
                    <asp:Label BackColor="Red" ID="lblResults" runat="server" />
                </div>
                <div id="header-form">
                </div>
                <div class="clear">
                </div>
                <div id="content-form">

                        <div id="tab11">
                        <table class="detail_table">
                                <tr>
                                    <td class="detail_table_td_150" style="border-bottom: dotted 1px #808080;">
                                        <span>SQL Server</span>&nbsp;</td>
                                    <td>
                                        <asp:TextBox ID="txtServer" runat="server" Text="" Width="200px" 
                                            style="text-align:left"></asp:TextBox>
                                    </td>
                                </tr>
                                 <tr>
                                    <td class="detail_table_td_150" style="border-bottom: dotted 1px #808080;">
                                        <span>Database Name</span>&nbsp;</td>
                                    <td>
                                        <asp:TextBox ID="txtDBName" runat="server" Text="" Width="200px" 
                                            style="text-align:left"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="detail_table_td_150" style="border-bottom: dotted 1px #808080;">
                                        <span>SQL User</span>&nbsp;</td>
                                    <td>
                                        <asp:TextBox ID="txtUsername" runat="server" Text="" Width="200px" 
                                            style="text-align:left" autocomplete="off"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="detail_table_td_150" style="border-bottom: dotted 1px #808080;">
                                        <span>SQL Password</span>&nbsp;</td>
                                    <td>
                                        <asp:TextBox ID="txtPassword" runat="server" Text="" autocomplete="off"
                                            TextMode="Password" Width="200px"></asp:TextBox>
                                    </td>
                                </tr>   
                            </table>

                            <asp:Button ID="Button2" runat="server" Text="Test Connection" Height="32px" 
                                onclick="Button2_Click" />
                                        <asp:Button ID="btn_SaveConnection" runat="server" Text="Save Connection" 
                                Height="32px" onclick="btn_SaveConnection_Click" />
                        </div>
                            
                    
                 
                     <div id="containTab" style="height:350px; overflow:scroll">      
                  
                            <table class="detail_table">
                                <tr>
                                    <td class="detail_table_td_150" style="border-bottom: dotted 1px #808080;">
                                        <span>User-Defined Tables</span>&nbsp;</td>
                                   
                                </tr>
                                <tr >
                                    <td>
<%-- OnItemCommand="lvContents_ItemCommand" --%>
                                    <asp:ListView ID="lvContents" runat="server"  ViewStateMode="Enabled">
                                <LayoutTemplate>
                                    <table class="data_table">
                                        <tr>
                                            <th id="thButtons" runat="server" style="width: 50px">
                                            </th>

                                            <th style="width: 70px">
                                                <span>Object ID</span>
                                            </th>
                                            <th style="width: 200px">
                                                <span>Name</span>
                                            </th>
                                            
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td style="text-align: left">
                                            <asp:LinkButton ID="imgbEdit" runat="server" CommandName="Edit" Text="Edit" ImageUrl="~/skin/icon/edit_icon_mono.gif" />
                                            <asp:LinkButton ID="imgbDelete" runat="server" CommandName="DeleteItem" Text="Delete"
                                                ImageUrl="~/skin/icon/delete_icon_mono.gif" OnClientClick="return confirm('Are you sure you want to delete this row?');"
                                                ToolTip="Delete" />
                                        </td>
                                       
                                        <td style="text-align: left">
                                      
                                            <asp:Label runat="server" ID="lblCode"><%#Eval("object_id") %></asp:Label>
                                        </td>
                                        <td style="text-align: left">
                                            <asp:Label runat="server" ID="lblDescription" ><%#Eval("name")%></asp:Label>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <tr>
                                        <td style="text-align: left">
                                            <asp:LinkButton ID="imgbUpdate" runat="server" CommandName="Update" Text="Update"
                                                ImageUrl="~/skin/icon/save_icon_mono.gif" CausesValidation="true" ValidationGroup="vgrpSaveContact" />
                                            <asp:LinkButton ID="imgbCancel" runat="server" CommandName="CancelUpdate" Text="Cancel"
                                                ImageUrl="~/skin/icon/undo_icon_mono.gif" CausesValidation="false" />
                                        </td>

                                       
                                        <td style="text-align: left">
                                            <asp:Label ID="lblCode" runat="server" Text='<%# Bind("ItemCode") %>' />
                                        </td>

                                        <td style="text-align: left">
                                            <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("Dscription")%>' />
                                        </td>
                                    </tr>
                                </EditItemTemplate>
                               
                               <%-- class="data_table"--%>
                                <EmptyDataTemplate>
                                    <table>
                                        <tr>
                                           
                                            <th>
                                                <span>Item Code</span>
                                            </th>
                                            <th>
                                                <span>Item Description</span>
                                            </th>
                                            
                                            
                                           
                                        </tr>
                                        <tr>
                                            <td colspan="3">
                                                <span>No Data</span>
                                            </td>
                                        </tr>
                                    </table>
                                </EmptyDataTemplate>
                            </asp:ListView>
                                    </td>

                                   
                                </tr>

                                <tr>
                                    <td>
                                    
                                        
                                    
                                    </td>
                                </tr>
                            </table>
                     </div>

 
                      
                </div>

                <div>
                    <asp:Button ID="btn_NewTable" runat="server" Text="Define New Table" />
                </div>
                <div class="clear">
                </div>
                
            </div>

        </ContentTemplate>
    </asp:UpdatePanel>


</asp:Content>
